home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE22 / CLINIC / GenMinU1.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-04-06  |  806 b   |  50 lines

  1. unit GenMinU1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     procedure FormCreate(Sender: TObject);
  13.     procedure Button1Click(Sender: TObject);
  14.   private
  15.     procedure DoRestore(Sender: TObject);
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   Form1: TForm1;
  22.  
  23. implementation
  24.  
  25. uses
  26.   GenVars, GenMinU2;
  27.  
  28. {$R *.DFM}
  29.  
  30. procedure TForm1.DoRestore(Sender: TObject);
  31. begin
  32.   if Assigned(MinForm) then
  33.   begin
  34.     MinForm.BringToFront;
  35.     MinForm := nil
  36.   end
  37. end;
  38.  
  39. procedure TForm1.FormCreate(Sender: TObject);
  40. begin
  41.   Application.OnRestore := DoRestore
  42. end;
  43.  
  44. procedure TForm1.Button1Click(Sender: TObject);
  45. begin
  46.   Form2.ShowModal
  47. end;
  48.  
  49. end.
  50.